package com.collect.tanzania.zhiBean.zhiReceive;

import android.text.TextUtils;

import com.collect.tanzania.zhiGlobal.zhiAppSettings.ZHIProjectConstants;
import com.collect.tanzania.zhiUtils.StringUtil;

import java.io.Serializable;
import java.math.BigDecimal;

public class ZHIRPerformanceB3Entity implements Serializable {
    private String completeFlag;
    private String bonus;
    private String remainAmount;

    public String getCompleteFlag() {
        return StringUtil.safeString(completeFlag);
    }

    public void setCompleteFlag(String completeFlag) {
        this.completeFlag = completeFlag;
    }

    public boolean isCompleteFlag(){
        return getCompleteFlag().equalsIgnoreCase("YES");
    }

    public String getBonus() {
        return StringUtil.safeString(bonus);
    }

    public void setBonus(String bonus) {
        this.bonus = bonus;
    }

    public String getBonusFormat(){
        return ZHIProjectConstants.RS_FLAG + StringUtil.numberTothousandFormatter(getBonus());
    }

    public String getRemainAmount() {
        return StringUtil.safeString(remainAmount);
    }

    public String getRemainAmountFormat(){
        return ZHIProjectConstants.RS_FLAG + StringUtil.numberTothousandFormatter(getRemainAmount());
    }

    public BigDecimal getRemainAmountBigDecimal() {
        String tempString = getRemainAmount();
        if (TextUtils.isEmpty(tempString)) {
            tempString = "0";
        }
        return new BigDecimal(tempString).stripTrailingZeros();
    }

    public void setRemainAmount(String remainAmount) {
        this.remainAmount = remainAmount;
    }
}
